package com.cinema.entity;

/**
 * 座位实体类
 */
public class Seat {
    private Integer id;
    private Integer hallId;
    private String rowNum;
    private Integer seatNum;
    private String seatType;
    private String status;
    
    // 关联对象
    private Hall hall;
    
    // 构造方法
    public Seat() {}
    
    public Seat(Integer hallId, String rowNum, Integer seatNum) {
        this.hallId = hallId;
        this.rowNum = rowNum;
        this.seatNum = seatNum;
    }
    
    // Getter和Setter方法
    public Integer getId() {
        return id;
    }
    
    public void setId(Integer id) {
        this.id = id;
    }
    
    public Integer getHallId() {
        return hallId;
    }
    
    public void setHallId(Integer hallId) {
        this.hallId = hallId;
    }
    
    public String getRowNum() {
        return rowNum;
    }
    
    public void setRowNum(String rowNum) {
        this.rowNum = rowNum;
    }
    
    public Integer getSeatNum() {
        return seatNum;
    }
    
    public void setSeatNum(Integer seatNum) {
        this.seatNum = seatNum;
    }
    
    public String getSeatType() {
        return seatType;
    }
    
    public void setSeatType(String seatType) {
        this.seatType = seatType;
    }
    
    public String getStatus() {
        return status;
    }
    
    public void setStatus(String status) {
        this.status = status;
    }
    
    public Hall getHall() {
        return hall;
    }
    
    public void setHall(Hall hall) {
        this.hall = hall;
    }
    
    /**
     * 获取座位显示名称
     */
    public String getSeatName() {
        return rowNum + "排" + seatNum + "座";
    }
    
    @Override
    public String toString() {
        return "Seat{" +
                "id=" + id +
                ", hallId=" + hallId +
                ", rowNum='" + rowNum + '\'' +
                ", seatNum=" + seatNum +
                ", seatType='" + seatType + '\'' +
                ", status='" + status + '\'' +
                '}';
    }
}
